package com.yt.annotation;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class TestRunner {

	public static void main(String... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
		Class clazz = Some.class;
		
		Method[] methods = clazz.getDeclaredMethods();
		
		for(Method method :methods){
			boolean isAnnotation = method.isAnnotationPresent(Easy.class);
			System.out.println(method.getName()+"==>当前方法是否有注解==>"+isAnnotation);
			if(method.isAnnotationPresent(Easy.class)){
				method.invoke(clazz.newInstance(), null);
			}
		}
	}
}
